package com.ht.miscorservice.demo.server.fegin;
import com.ht.miscorservice.demo.server.fallback.DemoTestFallbackFactory;
import com.ht.miscorservice.demo.server.remote.IBizDemo2ServiceRemote;
import com.ht.miscorservice.demo.server.remote.constant.RemoteServiceDemo2ServerServiceConstant;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.stereotype.Component;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;

/**
 * @Author: tyh
 * @Date: 2022-04-01
 * @Description: 调用远程服务
 */
@FeignClient(value = RemoteServiceDemo2ServerServiceConstant.SERVICE_ID,fallbackFactory = DemoTestFallbackFactory.class)
public interface Test1FeignService extends IBizDemo2ServiceRemote {
  @PostMapping("/test2/call")
   String getResultData(@RequestBody String name);
}
